<div id="viewblock_<?php echo $this->getAttachmentField()->getFieldname(); ?>">
    <?php if ($this->getValue()): ?>
        <?php foreach ($this->getValue() as $value): ?>
            <?php if (trim($value)): ?>
                <strong><a href="<?php echo $this->getUrl('orderattach/adminhtml_order/download', array('file' => $value)); ?>"><?php echo $value; ?></a></strong><br />
            <?php endif; ?>
        <?php endforeach; ?>
    <?php endif; ?>
</div>

<div id="editblock_<?php echo $this->getAttachmentField()->getFieldname(); ?>" style="display: none;">
    
    <?php if ($this->getValue()): ?>
        <?php foreach ($this->getValue() as $value): ?>
            <?php if (trim($value)): ?>
                <?php echo $value; ?>
                <div style="margin-top: 2px; margin-bottom: 10px;">
                    <button class="scalable" type="button" onclick="javascript: attachDeleteFile('<?php echo $this->getAttachmentField()->getFieldname(); ?>', '<?php echo $value; ?>', 'file_multiple');">
                        <span><?php echo $this->__('Delete'); ?></span>
                    </button>
                </div>
            <?php endif; ?>
        <?php endforeach; ?>
    <?php endif; ?>
    
    <form method="post" id="upload_form_<?php echo $this->getAttachmentField()->getFieldname(); ?>" enctype="multipart/form-data" action="<?php echo $this->getUrl('orderattach/adminhtml_order/upload'); ?>">
        <input type="hidden" name="form_key" value="<?php echo $this->getFormKey() ?>" />
        <input type="hidden" name="field" value="<?php echo $this->getAttachmentField()->getFieldname(); ?>" />
        <input type="hidden" name="order_id" value="<?php echo Mage::registry('current_order')->getId(); ?>" />
        <input type="hidden" name="type" value="file_multiple" />
        <input type="file" name="to_upload" />
    
        <iframe id="upload_target_<?php echo $this->getAttachmentField()->getFieldname(); ?>" 
                    name="upload_target_<?php echo $this->getAttachmentField()->getFieldname(); ?>" src="" style="display: none; width: 700px; height: 500px;"></iframe>
    
        <div style="margin-top: 2px;">
            <button class="scalable" type="button" onclick="javascript: attachUpload('<?php echo $this->getAttachmentField()->getFieldname(); ?>');">
                <span><?php echo $this->__('Upload'); ?></span>
            </button>
            <button class="scalable" type="button" onclick="javascript: attachCancel('<?php echo $this->getAttachmentField()->getFieldname(); ?>');">
                <span><?php echo $this->__('Cancel'); ?></span>
            </button>
        </div>
    </form>
</div>